from django.contrib import admin
from .models import WallPost, WallComment

@admin.register(WallPost)
class WallPostAdmin(admin.ModelAdmin):
    list_display = ('id', 'user', 'content', 'likes_count', 'created_at')
    search_fields = ('content', 'user__username')
    ordering = ('-created_at',)

@admin.register(WallComment)
class WallCommentAdmin(admin.ModelAdmin):
    list_display = ('id', 'post', 'user', 'content', 'created_at')
    search_fields = ('content', 'user__username', 'post__content')
    list_filter = ('created_at',)
    ordering = ('-created_at',)
